//
//  UIView+Extension.swift
//  WeiBo
//
//  Created by 许世强 on 2017/3/26.
//  Copyright © 2017年 许世强. All rights reserved.
//

import UIKit

extension UIView {

    var x:CGFloat{
        get {
            return frame.origin.x
        }set{
            frame.origin.x = newValue
        }
    }
    
    var y:CGFloat{
        get{
            return frame.origin.y
        }set{
            frame.origin.y = newValue
        }
    }
    
    var centX:CGFloat{
        get{
            return center.x
        }set{
            center.x = newValue
        }
    }
    
    var centY:CGFloat{
        get{
            return center.y
        }set{
            center.y = newValue
        }
    }
    
    var width: CGFloat{
        get{
            return frame.size.width
        }set{
            frame.size.width = newValue
        }
    }
    
    var height:CGFloat{
        get{
            return frame.size.height
        }set{
            frame.size.height = newValue
        }
    }
    
    var size:CGSize{
        get{
            return frame.size
        }set{
            frame.size = newValue
        }
    }
    
}
